FROM java:8
# 挂载目录 启动容器时需要加 -v 绑定挂载关系
VOLUME /mes/logs
VOLUME /mes/upload
# 将jar包添加到容器中并更名为app.jar
ARG JAR_FILE=chenghuisystem-admin/target/chenghuisystem-admin.jar
COPY ${JAR_FILE} /home/chenghuisystem-admin.jar
WORKDIR /home
#设置时区 防止日志打印时间不同步
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
EXPOSE 8080
ENTRYPOINT ["java", "-Dspring.profiles.active=prod","-jar","chenghuisystem-admin.jar"]
